home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 4
/
Apprentice-Release4.iso
/
Source Code
/
C
/
Games
/
Pentominoes 2.0
/
Pent code
/
Horizontal bars wipe.c
next >
Wrap
C/C++ Source or Header
|
1995-07-29
|
2KB
|
49 lines
#include "timing.h"
#include "Horizontal bars wipe.h"
#define CorrectTime 1
void HorizontalBarsWipe(GrafPtr sourceGrafPtr, GrafPtr destGrafPtr, Rect boundsRect)
{
RgnHandle leftRgn, rightRgn, fullRgn;
short offset;
short iter;
short barHeight;
Point zeroPoint;
short theWindowHeight, theWindowWidth;
theWindowWidth=boundsRect.right-boundsRect.left;
theWindowHeight=boundsRect.bottom-boundsRect.top;
offset=2;
barHeight=1;
zeroPoint.h=0;
zeroPoint.v=barHeight;
leftRgn=NewRgn();
OpenRgn();
MoveTo(0, 0);
iter=0;
while (iter<theWindowHeight)
{
Line(offset, 0);
Line(0, barHeight);
Line(-offset, 0);
Line(0, -barHeight);
Move(0, barHeight*2);
iter+=barHeight*2;
}
CloseRgn(leftRgn);
OffsetRgn(leftRgn, boundsRect.left, boundsRect.top);
rightRgn=NewRgn();
OpenRgn();
MoveTo(theWindowWidth, barHeight);
iter=0;
while (iter<theWindowHeight)
{
Line(-offset, 0);
Line(0, barHeight);
Line(offset, 0);
Line(0, -barHeight);
Move(0, barHeight*2);